Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python: PyPerf: Aarch64 support #287

Draft
wants to merge 39 commits into
base: master
Choose a base branch
from
Draft

python: PyPerf: Aarch64 support #287

wants to merge 39 commits into from

Conversation

Jongy
Copy link
Contributor

@Jongy Jongy commented Feb 4, 2022

Description

Support PyPerf running on Aarch64.

This currently passes "sanity" - works on Python 2.7.18 on Ubuntu 20.04 kernel 5.13.0-1008-aws. I am opening this PR to document what's left to be done & the tests we should run on it.

This depends on:

TODOs

Testing

x86_64:

  • x86_64 native stacks (as I have made changes in that area) when in user mode
  • x86_64 native stacks (as I have made changes in that area) when in kernel mode
  • x86_64 gProfiler as container PyPerf
  • x86_64 gProfiler as exe PyPerf
  • get_stack_offset on 4.14
  • get_stack_offset on 4.18
  • get_stack_offset on 5.11
  • get_stack_offset on 5.16
  • get_fs_offset on 4.14
  • get_fs_offset on 4.18
  • get_fs_offset on 5.11
  • get_fs_offset on 5.16

Aarch64:

  • Get gProfiler test suite to run on Aarch64 (specifically the Python tests pertaining PyPerf)
  • Aarch64 gProfiler as container PyPerf
  • Aarch64 gProfiler as exe PyPerf
  • Aarch64 native stacks when in user mode
  • Aarch64 native stacks when in kernel mode
  • Aarch64 kernel stacks
  • Aarch64 Python 2.7 Python stacks incl classes (glibc)
  • Aarch64 Python 3.6 Python stacks incl classes (glibc)
  • Aarch64 Python 3.7 Python stacks incl classes (glibc)
  • Aarch64 Python 3.8 Python stacks incl classes (glibc)
  • Aarch64 Python 3.9 Python stacks incl classes (glibc)
  • Aarch64 Python 3.10 Python stacks incl classes (glibc)
  • Aarch64 Python 3.8 Python stacks (musl based, one Python version is enough)

@Jongy Jongy mentioned this pull request May 1, 2022
4 tasks
Jongy added a commit that referenced this pull request Sep 17, 2022
Full matrix of feature tests for py-spy & PyPerf across all desired versions.
This is what I suggested in #287 and finally got around to implement. I rather have
these in place before performing any other changes on PyPerf/py-spy.
Jongy added a commit that referenced this pull request Sep 22, 2022
Full matrix of feature tests for py-spy & PyPerf across all desired versions.
This is what I suggested in #287 and finally got around to implement. I rather have
these in place before performing any other changes on PyPerf/py-spy.
pyi.Dockerfile Outdated Show resolved Hide resolved
@Jongy
Copy link
Contributor Author

Jongy commented Nov 30, 2022

x86_64: build should pass, and hopefully will the tests.

Aarch64: I managed to build container, exe still failing. Tested against Python 3.8 on kernel5.11, Python symbols all get [Error (errnos) 14] stacks and native stacks get [Error unw_init_remote (bad register number)]_[pn]. Kernel stacks work but these are easiest 🤷

@Jongy
Copy link
Contributor Author

Jongy commented Nov 30, 2022

Got it running just fine against Python 2 (well, as the description says). Native stacks still fail, but I get good Python 2 symbols & including class names. Very good

@Jongy
Copy link
Contributor Author

Jongy commented Dec 17, 2022

Python 3 works now

@Jongy
Copy link
Contributor Author

Jongy commented Dec 17, 2022

Native stacks are broken on x86_64, I'll fix that and then continue to fixing it on Aarch64. So far on Aarch64 I'm seeing a similar error to libunwind/libunwind#113 but it's not clear if that error is transient or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant